package k2_oop.p7_javaLang.demo03;

public class UseThrows {

    public static void test1() throws NullPointerException,ArrayIndexOutOfBoundsException{
        int[] nums = {1, 2, 3, 4, 5, 6, 7, 8, 9};
        System.out.println(nums[nums.length]);
        String s = "hello";
        s.length();
    }

    public static void test2() throws RuntimeException {
        test1();
    }

    public static void main(String[] args) throws RuntimeException{

        UseThrows.test2();
    }

}
